/**
 * @Title:UserManageBusinessServiceImpl.java
 * @Package com.cnooc.business.common.impl
 * @Description TODO
 * @author Jiangcl
 * @date 2012-2-16下午01:24:48
 * @version V1.0
 */
package com.cat.business.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cat.bean.common.Constant;
import com.cat.business.RoleBusinessService;
import com.cat.entity.TbRole;

import com.cat.service.common.RoleService;

@Service
public class RoleBusinessServiceImpl implements RoleBusinessService {

	@Resource
	private RoleService roleService;

	@Override
	public void deleteRole(TbRole role) {
		roleService.delete(role);

	}

	@Override
	public TbRole getRole(Integer id) {

		return roleService.get(id);
	}

	@Override
	public List<TbRole> getRoleList(TbRole role) {

		return roleService.getRoleList(role);
	}

	@Override
	public void saveRole(TbRole role) {
		if (role.getRoleId() != null) {
			roleService.update(role);
		} else {
			roleService.save(role);
		}
	}

}
